<script>
$(function(){
    $('#post').submit(function(){
		$.post(location.href,$(this).serialize(),function(data){
			alert(data.message);
			if (data.state <= 0)
			{
				return false;
			}
			window.location.href = '?app=<?=APP?>&mod=<?=MOD?>&act=list';
		},'json');
        return false;
    });
	
	$('#parent_id').val(<?=$this->class['parent_id']?>);
});
</script>
<div class="line_1"></div>
<form id="post" method="post">

<div class="list-div" style="margin-bottom:5px;">
    <table>
        <tr>
            <td align="right" width="150px"><strong>分类名称：</strong></td>
            <td><input name="class_name" value="<?=$this->class['class_name']?>" /></td>
        </tr>
        <tr>
            <td align="right" width="150px"><strong>上级分类：</strong></td>
            <td>
				<select name="parent_id" id="parent_id">
					<option value="0">顶级分类</option>
					<?php foreach((array)$this->lists as $item): ?>
					<option value="<?=$item['class_id']?>"><?=$item['class_name']?></option>
					<?php endforeach; ?>
				</select>
			</td>
        </tr>
        <tr>
            <td align="right" width="150px"><strong>排序：</strong></td>
            <td><input name="sort" value="<?=$this->class['sort']?>" /></td>
        </tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" value="提交" /></td>
		</tr>
    </table>
</div>

</form>